package com.swjd.jingle.util;

import android.app.Application;
import android.content.Context;

import androidx.multidex.MultiDex;

import com.hxl.okhttp.OkHttpUtils;
import com.swjd.jingle.pojo.MyType;
import com.swjd.jingle.pojo.User;
import com.xuexiang.xui.XUI;

import java.util.List;

public class App extends Application {
    private OkHttpUtils okHttpUtils = OkHttpUtils.getOkHttpUtils();
    private User userInfo;
    private List<MyType> types;
    private MyType.TypeListBean typeListBean;

    @Override
    public void onCreate() {
        super.onCreate();
        XUI.init(this);
        XUI.debug(true);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        //解决4.x运行崩溃的问题
        MultiDex.install(this);
    }

    public OkHttpUtils getOkHttpUtils() {
        return okHttpUtils;
    }

    public User getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(User userInfo) {
        this.userInfo = userInfo;
    }

    public List<MyType> getTypes() {
        return types;
    }

    public void setTypes(List<MyType> types) {
        this.types = types;
    }

    public MyType.TypeListBean getTypeListBean() {
        return typeListBean;
    }

    public void setTypeListBean(MyType.TypeListBean typeListBean) {
        this.typeListBean = typeListBean;
    }
}
